package com.Cychat.commons.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Auther: 谢宝辉  <br/>
 * Date: 2025/11/7:14:23  <br/>
 * Description: 超管、医生、商家的user实体
 */
@Data
@TableName("user_info")
public class UserInfo {
    @TableId(value = "userinfo_id", type = IdType.AUTO)
    private Integer userinfoId;

    @TableField("nick_name")
    private String nickName;

    @TableField("password")
    private String password;

    @TableField("avatar")
    private String avatar;

    @TableField("status")
    private Integer status;
    @TableField("role_id")
    private Integer roleId;

    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField("update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
}
